/* eslint-disable no-undef,no-param-reassign,import/named,consistent-return */
/**
 * Created by chengzhenfu on 2019/5/5.
 * Modified by  on .
 *请求方法模块
 */
import qs from 'qs'
import Vue from 'vue'
import fetch from './fetch.js'
const http = {
    get(url, base, config) {
        const data = {params: base};
        return fetch(url, data, config);
    },
    
    post(url, data, config) {
        return fetch({
			url: url,
			method: 'post',
			params: data
		});
    },
	
    put(url, base, config) {
        const data = base;
        return fetch.put(url, data, config)
    },
    
    delete(url, base, config) {
        const data = {data: base};
        return fetch.delete(url, data, config);
    }
}
Vue.prototype.$http = http;
export default http;
